package com.pmcc.cj.entity;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.pmcc.core.entity.UUIDEntity;
import com.pmcc.utils.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;

/**
 * app登录人员表
 * Created by tomas on 2020/9/21.
 */
@Entity
@Table(name = "cj_customer")
public class CjCustomer extends UUIDEntity {
    @Column(name = "user_name", length = 150, unique = true)
    private String userName;//用户名
    @Column(name = "password")
    private String password;//密码
    @Column(name = "attribute")
    private String attribute;//成员属性
    @Column(name = "wechat_id")
    private String wechatId;//微信id
    @Column(name = "wechat_name")
    private String wechatName;//微信昵称
    @Column(name = "wechat_image")
    private String wechatImage;//微信图像地址
    @Column(name = "sex")
    private Integer sex;//性别
    @Column(name = "card_id")
    private String cardId;//身份证号
    @Column(name = "card_name")
    private String cardName;//身份证姓名
    @Column(name = "is_card_auth")
    private Boolean isCardAuth;//是否实名认证
    @Column(name = "is_driver_auth")
    private Boolean isDriverAuth;//是否是机手
    //0：初始化     1：零售商       2：代理商
    @Column(name = "retailer")
    private Integer retailer;
    //初始化为普通农户   0：普通农户  1：种地大户
    @Column(name = "proxy")
    private Integer proxy;
    @Column(name = "province")
    private String province;//省
    @Column(name = "city")
    private String city;//市
    @Column(name = "county")
    private String county;//县
    @Column(name = "township")
    private String township;//乡
    @Column(name = "village")
    private String village;//村
    @Column(name = "address")
    private String address;//详细地址
    @Column(name = "cellphone")
    private String cellphone;//手机号
    @Column(name = "last_login_time")
    private Date lastLoginTime;//上次登录时间
    @Column(name = "enabled")
    private String enabled; //0启用 1禁用
    @Column(name = "cash_password")
    private String cashPassword;//提现密码
    @Column(name = "create_time")
    private Date createTime;//创建时间
    @Column(name = "del_flag")
    private Integer delFlag;//删除标记
    @Column(name = "money")
    private BigDecimal money;//账户余额
    @Column(name = "freeze_money")
    private BigDecimal freezeMoney;//账户冻结资金
    @Column(name = "role_id")
    private String roleId;//角色id    登录时用
    @Column(name = "integral")
    private Double integral;//机手认证成功则初始化1000分。
    @Column(name = "pay_flag")
    private Integer payFlag;//由于支付成功之后回调了多次，用于确认没有重复,从0开始
    @Column(name = "robot_flag")
    private Integer robotFlag;//机手是否推送任务，0：推送   1：不推送
    @Column(name = "remark")
    private String remark;//备注

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Integer getPayFlag() {
        return payFlag;
    }

    public void setPayFlag(Integer payFlag) {
        this.payFlag = payFlag;
    }

    public String getTownship() {
        return township;
    }

    public void setTownship(String township) {
        this.township = township;
    }

    public String getVillage() {
        return village;
    }

    public void setVillage(String village) {
        this.village = village;
    }

    public Double getIntegral() {
        return integral;
    }

    public void setIntegral(Double integral) {
        this.integral = integral;
    }

    public String getAttribute() {
        return attribute;
    }

    public void setAttribute(String attribute) {
        this.attribute = attribute;
    }

    public String getWechatId() {
        return wechatId;
    }

    public void setWechatId(String wechatId) {
        this.wechatId = wechatId;
    }

    public String getWechatName() {
        return wechatName;
    }

    public void setWechatName(String wechatName) {
        this.wechatName = wechatName;
    }

    public String getWechatImage() {
        return wechatImage;
    }

    public void setWechatImage(String wechatImage) {
        this.wechatImage = wechatImage;
    }

    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public String getCardId() {
        return cardId;
    }

    public void setCardId(String cardId) {
        this.cardId = cardId;
    }

    public String getCardName() {
        return cardName;
    }

    public void setCardName(String cardName) {
        this.cardName = cardName;
    }

    public Boolean getCardAuth() {
        return isCardAuth;
    }

    public void setCardAuth(Boolean cardAuth) {
        isCardAuth = cardAuth;
    }

    public Boolean getDriverAuth() {
        return isDriverAuth;
    }

    public void setDriverAuth(Boolean driverAuth) {
        isDriverAuth = driverAuth;
    }

    public Integer getProxy() {
        return proxy;
    }

    public void setProxy(Integer proxy) {
        this.proxy = proxy;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getCounty() {
        return county;
    }

    public void setCounty(String county) {
        this.county = county;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getCellphone() {
        return cellphone;
    }

    public void setCellphone(String cellphone) {
        this.cellphone = cellphone;
    }
    @JsonSerialize(using = DateTimeFormat.class)
    public Date getLastLoginTime() {
        return lastLoginTime;
    }

    public void setLastLoginTime(Date lastLoginTime) {
        this.lastLoginTime = lastLoginTime;
    }

    public String getEnabled() {
        return enabled;
    }

    public void setEnabled(String enabled) {
        this.enabled = enabled;
    }

    public String getCashPassword() {
        return cashPassword;
    }

    public void setCashPassword(String cashPassword) {
        this.cashPassword = cashPassword;
    }

    @JsonSerialize(using = DateTimeFormat.class)
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(Integer delFlag) {
        this.delFlag = delFlag;
    }

    public BigDecimal getMoney() {
        return money;
    }

    public void setMoney(BigDecimal money) {
        this.money = money;
    }

    public BigDecimal getFreezeMoney() {
        return freezeMoney;
    }

    public void setFreezeMoney(BigDecimal freezeMoney) {
        this.freezeMoney = freezeMoney;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getRoleId() {
        return roleId;
    }

    public void setRoleId(String roleId) {
        this.roleId = roleId;
    }

    public Integer getRetailer() {
        return retailer;
    }

    public void setRetailer(Integer retailer) {
        this.retailer = retailer;
    }

    public Integer getRobotFlag() {
        return robotFlag;
    }

    public void setRobotFlag(Integer robotFlag) {
        this.robotFlag = robotFlag;
    }
}
